﻿<%@ Page Title="Home Page" Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true"
    CodeBehind="Default.aspx.cs" Inherits="Ewma._Default" %>

<asp:Content ID="HeaderContent" runat="server" ContentPlaceHolderID="HeadContent">
- Your events
</asp:Content>
<asp:Content ID="BodyContent" runat="server" ContentPlaceHolderID="MainContent">
    <h2>
        The events you are invited to
    </h2>
    <table border="1">
    <tr><th>Location</th><th>Date</th><th>Action</th><th>Status</th></tr>
    <% foreach (var e in Player.Invitations){
           var i = e.InvitationFor (Player); %>
    <tr>
      <td><%= e.Location.Name %></td>
      <td><% = e.Date %></td>
      <td>
        <% if (i.MayAccept ())
           { %>
             <a href = "savapanon">Accept</a>
        <% }
           if (i.MayDecline ())
           { %>
             <a href = "savapanon">Decline</a>
        <% }
           if (i.MayCrash ())
           { %>
             <a href = "savapanon">Crash in</a>
        <% } %>
      </td>
      <td><% = i.InvitationStatus %></td>
      
    </tr>
   
    <% } %>
    </table>
    <h2>
        The events you host
    </h2>
    <% if (Membership.GetUser () == null)
       { %>
          You need to be <a href="/Account/Login.aspx">logged-in</a> to manage your own events. Registration is free and only takes a few seconds. 
    <% }
       else
       { %>
          This would be the list of your own events
   <% } %>
   <h2>Or use a third party app</h2>
   <p>EWMA is fully controllable from a Web Service client. If you want, you can contact me for details about the protocol, or start <a href="/Services/metadata" target="_blank">Here</a>.</p>
</asp:Content>
